$(function(){
	var currentmenuitem = $("#currentmenuitem").val();
	//alert(currentmenuitem);
	$("#header_top span").each(function (){
		var $span = $(this);
		$(this).css("background-color","");
		$span.click(function(){
			//更换背景
			$("#header_top span").each(function(){
				$(this).css("background-color","");
			});
			$span.css("background-color","#FF9933");
			//发送请求
			window.location.href=$("#contentpath").val()+"/MenuDispatcher.do?type="+$span.text();
		});
		//alert($span.text());
		if(jQuery.trim(currentmenuitem)==jQuery.trim($(this).text())){
			$(this).css("background-color","#FF9933");
		}
	});
	
	
});
function sortTable(){
	window.location.href=$("#contentpath").val()+"/MenuDispatcher.do?type="+$("#currentmenuitem").val()+getParms();
}
function getParms(){
	var parms = "&random="+Math.random();
	var temp = $("#price").val();
	parms+="&price="+temp;
	temp=$("#price_start").val();
	parms+="&price_start="+temp;
	temp = $("#price_end").val();
	parms+="&price_end="+temp;
	temp = $("#fensi_start").val();
	parms+="&fensi_start="+temp;
	temp = $("#fensi_end").val();
	parms+="&fensi_end="+temp;
	temp = $("#key_name").val();
	parms+="&key_name="+temp;
	temp = $("#host_name").val();
	parms+="&host_name="+temp;
	temp=$("#sort_").val();
	parms+="&sort_="+temp;
	temp = $("#platform").val();
	parms+="&platform="+temp;
	temp=$("#province").val();
	parms+="&province="+temp;
	temp=$("#city").val();
	parms+="&city="+temp;
	if(($("#isv_quanbu").attr("checked"))!=undefined){
		temp=$("#isv_quanbu").val();
	}
	if(($("#isv_shi").attr("checked"))!=undefined){
		temp=$("#isv_shi").val();
	}
	if(($("#isv_fou").attr("checked"))!=undefined){
		temp=$("#isv_fou").val();
	}
	parms+="&isv="+temp;
	return parms;
}